package cn.liyicun.cp.cpweb.entity;

import java.io.Serializable;

public class ExpectInfoKey implements Serializable {
    private String code;

    private Long expect;

    private static final long serialVersionUID = 1L;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Long getExpect() {
        return expect;
    }

    public void setExpect(Long expect) {
        this.expect = expect;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", code=").append(code);
        sb.append(", expect=").append(expect);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ExpectInfoKey other = (ExpectInfoKey) that;
        return (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getExpect() == null ? other.getExpect() == null : this.getExpect().equals(other.getExpect()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getExpect() == null) ? 0 : getExpect().hashCode());
        return result;
    }
}